require("../less/ad.less");

//文档加载事件
//相当于jq中的$(function(){...})
document.ready(function() {
    let timeCount = document.querySelector('#timeCount');
    let jumpBtn = document.querySelector('#jumpBtn');

    //功能一: 倒计时跳转
    let num = 5;
    let tmeId = setInterval(function() {
        num--;
        timeCount.textContent = num + 's';
        if (num == 0) {
            location.href = './login.html';
        }
    }, 1000);

    //功能二: 点击跳转按钮直接跳转
    jumpBtn.addEventListener('click', function() {
        location.href = './login.html';
    })
})